package learnjava.concur.chapter5;

public class P003 {

    static boolean run = true;

    public static void main(String[] args) throws Exception{
        new Thread(()->{
            while (run){
                System.out.print("");
            }
            System.out.println("线程停了");
        }).start();

        Thread.sleep(1000);
        System.out.println("更改run");
        run = false;
    }
}
